package top.littlejiang.onlinexam.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import top.littlejiang.onlinexam.common.utils.DateUtils;

/**
 * <p>
 * OlexamUser
 * </p>
 *
 * @author chen
 * @since 2020-12-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("OlexamUser")
public class OlexamUser implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 账号 登录用户名
     */
    private Integer userAccount;

    /**
     * 用户名
     */
    private String userName;

    /**
     * 性别
     */
    private String userSex;

    /**
     * 用户密码
     */
    private String userPwd;

    /**
     * 盐值
     */
    private String userSalty;

    /**
     * 用户电话
     */
    private String userPhone;

    /**
     * 邮箱
     */
    private String userEmail;

    /**
     * 所属班级
     */
    private Integer fkClassId;

    /**
     * 头像url
     */
    private String userPicture;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = DateUtils.DATE_TIME_PATTERN_19)
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN_19, timezone="GMT+8")
    private Date createTime;

    /**
     * 修改时间
     */
    @DateTimeFormat(pattern = DateUtils.DATE_TIME_PATTERN_19)
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN_19, timezone="GMT+8")
    private Date updateTime;

    /**
     * 逻辑删除
     */
    @JsonProperty(value = "isDel")
    private int isDel;

    /**
     * 备注
     */
    private String remarks;

    @TableField(exist = false)
    private String roleSign;

    @TableField(exist = false)
    private Integer roleId;

    @TableField(exist = false)
    private String roleName;
}
